From aed7fb3cf28021f555e938fa1226072db745ea22 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 24 Jun 2020 16:48:54 -0700 Subject: [PATCH] procd: fix compilation with uClibc-ng MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit _GNU_SOURCE was missing. Also defined two macros unavailable with uClibc-ng. Signed-off-by: Rosen Penev [resolved conflict in jail.c] Signed-off-by: Petr Å tetiar --- jail/console.c | 4 ++++ jail/jail.c | 4 ++++ trace/trace.c | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/jail/console.c b/jail/console.c index eacb2fa..588d241 100644 --- a/jail/console.c +++ b/jail/console.c @@ -11,6 +11,10 @@ * GNU General Public License for more details. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include #include #include diff --git a/jail/jail.c b/jail/jail.c index 645c836..8a2d890 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -46,6 +46,10 @@ #include #include +#ifndef CLONE_NEWCGROUP +#define CLONE_NEWCGROUP 0x02000000 +#endif + #define STACK_SIZE (1024 * 1024) #define OPT_ARGS "S:C:n:h:r:w:d:psulocU:G:NR:fFO:T:EyJ:" diff --git a/trace/trace.c b/trace/trace.c index 78b99dd..93554f7 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -33,6 +33,11 @@ #define PTRACE_EVENT_STOP 128 #endif +#ifndef PTRACE_EVENT_SECCOMP +/* undefined with uClibc-ng */ +#define PTRACE_EVENT_SECCOMP 7 +#endif + #include #include #include -- 2.30.2